package com.ews.onlineexchange.controller;

import javax.enterprise.context.ConversationScoped;
import javax.inject.Inject;
import javax.inject.Named;

import com.ews.onlineexchange.model.AdditionalTradeRating;
import com.ews.onlineexchange.service.EntityHome;
import com.ews.onlineexchange.service.TradeRatingHome;

@Named
@ConversationScoped
public class AdditionalTradeRatingHome extends EntityHome<AdditionalTradeRating, String> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Inject
	TradeRatingHome tradeRatingHome;

	@Override
	public String save() {
		getInstance().setTradeRating( tradeRatingHome.getInstance() );
		String result = super.save();
		
		return "SuccessBulletinList.xhtml?faces-redirect=true";
	}

}
